#ifndef DEFECTFORM_H
#define DEFECTFORM_H

#include <QWidget>
#include <QScrollBar>

#include <SqliteUtil/sqliteutil.h>

namespace Ui {
class DefectForm;
}

class DefectForm : public QWidget
{
    Q_OBJECT

public:
    explicit DefectForm(QWidget *parent = nullptr);
    ~DefectForm();

    void InitPage();

    void UpdateTable();

public slots:
    void slotsDlgInfo();
private slots:
    void on_Bt_Add_clicked();

    void on_Bt_Delete_clicked();

    void on_Bt_Change_clicked();

    void on_Bt_Search_clicked();

    void on_Bt_PrePage_clicked();

    void on_Bt_NextPage_clicked();

    void OnSlideAction(int nRowIndex);

    void on_tableWidget_cellClicked(int row, int column);

    void on_tableWidget_cellDoubleClicked(int row, int column);

private:
    Ui::DefectForm *ui;
    int m_nCurPage; //当前页数
    int m_nRowsPerPage; // 每页显示的行数
    int m_nTotalPages;  // 表格总页数

    QString m_strCurID;

    SqliteUtil m_sql;
};

#endif // DEFECTFORM_H
